package rexsee.network;


public class SocketAbstractClass {

	public static final String EVENT_SOCKET_STARTED = "onSocketStarted";
	public static final String EVENT_SOCKET_FAILED = "onSocketFailed";
	public static final String EVENT_SOCKET_CONNECTED = "onSocketConnected";
	public static final String EVENT_SOCKET_LOST = "onSocketLost";
	public static final String EVENT_SOCKET_READ = "onSocketRead";
	public static final String EVENT_SOCKET_WRITE = "onSocketWrite";

	public static abstract class SocketStartedListener {
		public abstract void run(String id, boolean isServer);
	}
	public static abstract class SocketFailedListener {
		public abstract void run(String id, boolean isServer, String error);
	}
	public static abstract class SocketConnectedListener {
		public abstract void run(String id, long index);
	}
	public static abstract class SocketLostListener {
		public abstract void run(String id, long index, String message);
	}
	public static abstract class SocketDataListener {
		public abstract void run(String id, long index, byte[] bytes);
	}

}
